package com.ruoyi.ewem.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ewem.domain.Drivers;
import com.ruoyi.ewem.mapper.EwemDriversMapper;
import com.ruoyi.ewem.service.IEwemDriversService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 物流司机Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-27
 */
@Service
public class EwemDriversServiceImpl extends ServiceImpl<EwemDriversMapper,Drivers> implements IEwemDriversService
{
    @Autowired
    private EwemDriversMapper ewemDriversMapper;

    /**
     * 查询物流司机
     * 
     * @param driverId 物流司机主键
     * @return 物流司机
     */
    @Override
    public Drivers selectEwemDriversByDriverId(Long driverId)
    {
        return ewemDriversMapper.selectEwemDriversByDriverId(driverId);
    }

    /**
     * 查询物流司机列表
     * 
     * @param ewemDrivers 物流司机
     * @return 物流司机
     */
    @Override
    public List<Drivers> selectEwemDriversList(Drivers ewemDrivers)
    {
        return ewemDriversMapper.selectEwemDriversList(ewemDrivers);
    }

    /**
     * 新增物流司机
     * 
     * @param ewemDrivers 物流司机
     * @return 结果
     */
    @Override
    public int insertEwemDrivers(Drivers ewemDrivers)
    {
        return ewemDriversMapper.insertEwemDrivers(ewemDrivers);
    }

    /**
     * 修改物流司机
     * 
     * @param ewemDrivers 物流司机
     * @return 结果
     */
    @Override
    public int updateEwemDrivers(Drivers ewemDrivers)
    {
        return ewemDriversMapper.updateEwemDrivers(ewemDrivers);
    }

    /**
     * 批量删除物流司机
     * 
     * @param driverIds 需要删除的物流司机主键
     * @return 结果
     */
    @Override
    public int deleteEwemDriversByDriverIds(Long[] driverIds)
    {
        return ewemDriversMapper.deleteEwemDriversByDriverIds(driverIds);
    }

    /**
     * 删除物流司机信息
     * 
     * @param driverId 物流司机主键
     * @return 结果
     */
    @Override
    public int deleteEwemDriversByDriverId(Long driverId)
    {
        return ewemDriversMapper.deleteEwemDriversByDriverId(driverId);
    }

    @Override
    public List<Drivers> selectDriversList() {
        return ewemDriversMapper.selectDriversList();
    }
}
